Technical Field
The present disclosure relates to a method of independent control period allocation of axes in a programmable logic controller (PLC) positioning system. More specifically, in some embodiments, the present disclosure relates to a method of independent control period allocation of axes in a PLC positioning system controlling a plurality of axes, in which the axes are divided into a first axis group requiring a faster response and a second axis group requiring a slower response and a task is switched at a point of time when position control calculation of the first axis group is requested, so as to perform the position control calculation of the first axis group in preference to position control calculation of the second axis group.
Description of the Related Art
A positioning function of a programmable logic controller (PLC) is a function of moving an object to a correct position by driving a motor with a fast pulse train output to a transistor output contact point of the PLC.
With increase in the complexity of an automatic control system, a variety of applications for controlling a number of axes with a single controller have been developed. However, the existing direct servo-drive control based on a pulse or an analog signal has a limitation in the number of controllable servo-drives since input/output contact points are connected to servo-drives in a one-to-one correspondence.
However, in recent years, beyond the above-mentioned method, other methods of using networking technologies to transmit a target position and speed to a number of servo-drives in real time have been utilized.
As one example, an EtherCAT protocol may be used to provide instruction values and control data to 100 servo-axes every 100 μs. However, it is difficult to calculate the movement of each of the 100 servo-axes every 100 μs. Of course, an MPU with high performance may help to reduce calculation time, but cannot avoid any inherent limitation.
A PLC positioning system calculates a pulse to be output every control period defined in unit time. The control period typically varies within a range from several hundred μm to several ten ms depending on makers and products. A frequency of a pulse output during a control period is constant and a speed (i.e., frequency) of a pulse to be output for the next control period is determined. Therefore, a shorter control period facilitates smoother motor control.
FIGS. 1 and 2 are diagrams used to explain a position control calculation method of a conventional PLC positioning system.
Referring to FIGS. 1 and 2, an amount of movement of an axis to be moved within a control period for each axis from the beginning of the control period of each interval is calculated (S1). In general, calculation from the first axis to the last axis (varying depending on products) is completed. Upon completing the calculation, a task waits for the remaining time of the corresponding control period or the remaining task required for control is proceeding (S2). During the next control period after completing the calculation, the amount of movement calculated in the previous control period is output to a servo-drive and, in the corresponding control period, an amount of movement during the second next control period of each axis is calculated (S3). The amount of movement calculated in the first control period is output during the second control period. The amount of movement calculated at this time is stored in an output buffer and is later output.
The above-described method has to allocate a control period in consideration of the maximum calculation time of all axes since the control periods of the axes are same. For example, if a system having 10 axes of the same kind whose calculation time is the maximum of 1 ms is to be controlled, the control period has to be allocated to 10 ms at minimum.
FIG. 3 is a diagram used to explain a case where a period of time taken to calculate all axes exceeds a control period in the conventional PLC positioning system.
Referring to FIG. 3, although an amount of movement of axes whose calculation is completed within the first control period including the first axis and the second axis is transferred to a servo-drive normally during the next control period, an axis whose calculation is not completed within the first control period (first interval) has no amount of movement to be output during the next control period.
Therefore, an nth axis has no actual output in the second interval. Accumulation of such an effect may cause an increasing position error. Therefore, if all axes are to be controlled with the same control period, position control calculation of all axes has to be completed with an allocated control period.
However, the control period has an effect on responsiveness and flexibility of the control system. A longer control period leads to a slower response at an end-point as much, which has a direct effect on a yield of products.
In addition, since a rate of speed change in an acceleration/deceleration interval increases, there is a high possibility of a failure due to a mechanical shock. Therefore, there is a need for a novel method for calculation of multiple axes.